package com.ghy.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 新闻表 实体类。
 *
 * @author ghy
 * @since 2024-12-22
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "article", schema = "ml_sms")
public class Article implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id
    private Long id;

    /**
     * 标题
     */
    private String title;

    /**
     * 内容
     */
    private String content;

    /**
     * 序号
     */
    private Long idx;

    /**
     * 数据版本
     */
    @Column(version = true)
    private Integer version;

    /**
     * 逻辑删除，0未删除，1已删除
     */
    @Column(isLogicDelete = true)
    private Integer deleted;

    /**
     * 创建时间，当前时间
     */
    private LocalDateTime created;

    /**
     * 修改时间，当前时间
     */
    private LocalDateTime updated;

}
